import request from '@/utils/request'

const auditApi = {
  process: '/api/sys_auditprocess/getSys_AuditProcessList',
  processInfo: '/api/sys_auditprocess/getSys_AuditProcessByID',
  queryProcessName: '/api/sys_auditprocess/judgeExamName',
  setProcess: '/api/sys_auditprocess/Post_Sys_AuditProcess',
  audit: '/api/auditmanagement/getAuditManagementList',
  setAudit: '/api/auditmanagement/Post_AuditManagement'
}

export function getProcessList (parameter) {
  return request({
    url: auditApi.process,
    method: 'get',
    params: parameter
  })
}

export function getProcessInfo (parameter) {
  return request({
    url: auditApi.processInfo,
    method: 'get',
    params: parameter
  })
}

export function queryProcessName (parameter) {
  return request({
    url: auditApi.queryProcessName,
    method: 'get',
    params: parameter
  })
}

export function setProcess (data) {
  return request({
    url: auditApi.setProcess,
    method: 'post',
    data
  })
}

export function getAuditList (parameter) {
  return request({
    url: auditApi.audit,
    method: 'get',
    params: parameter
  })
}

export function setAudit (data) {
  return request({
    url: auditApi.setAudit,
    method: 'post',
    data
  })
}
